<?php
use doumiaoduo\layer\LayerAsset;
LayerAsset::register($this);
use yii\widgets\ActiveForm;
use yii\helpers\Html;
?>
    <div class="yx-clear">
        <label class="zx-label" >机构</label>
        <div class="zx-field-floatl">
            <?=\yii\helpers\Html::encode(isset($modelmechanic->mechanic)?$modelmechanic->mechanic->name:'');?>
        </div>
    </div>
<div class="yx-clear">
    <label class="zx-label" >结算总金额</label>
    <div class="zx-field-floatl" >
        <?=\yii\helpers\Html::encode($modelmechanic->total);?>
    </div>
</div>
<div class="clear"></div>
<?=$form?>
<?php
$js=<<<JS
 layer.config({
        extend: ['skin/customskin/style.css']//加载您的扩展样式
    });
    var layout='<div class="yx-warn yx-radius50"><h1>!</h1></div>';
   $(document).on('click','#dosubmit',function(e){
       e.preventDefault();
       var radio = $('input[type="radio"]:checked ').val();
       if(radio == 1){
              layer.confirm(layout+'<p>确定已付款么？</p>', {
                title: '结算',
                area: ['440px', '270px'],
                skin: 'layui-confirm-customskin',
                shift:1,
                id:'layer-iframe',
                btn: ['确定','取消'],
                yes: function(index, layero){
                  $('#settlement-form').submit();
                  layer.close(index);
                }
          });
        }

   });
JS;
\Yii::$app->view->registerJs($js);
?>